{% extends "themes/silently/base.html" %}
{% load everfilters %}
{% block title %}Home - {{ site_title }}{% endblock %}
{% block nav %}
	<ul>
		<li class="active"><a href="{{ site_url }}">Home</a></li>
			{% for item in pages %} 
				<li><a href="{{ site_url }}{{ item.date|date:"Y/m/" }}{% if item.slug %}{{ item.slug }}{% else %}{{ item.id }}{% endif %}/" title="{{ item.title }}">{{ item.title }}</a></li>
			{% endfor %}
	</ul>
{% endblock %}
{% block content %}
	<ol id="posts-list" class="feed">
		{% for item in posts.object_list %} 
			<li>
				<article class="entry">
					<header>
					<h2 class="entry-title"><a href="{{ site_url }}{{ item.date|date:"Y/m/" }}{% if item.slug %}{{ item.slug }}{% else %}{{ item.id }}{% endif %}/" rel="bookmark">{{ item.title }}</a></h2>
					</header>
					<footer>
							wiboshu post on <time datetime="{{ item.date|date:"Y-m-d" }}">{{ item.date|date:"M d Y" }}</time>
							|	tags：
							{% for tag in item.tags.all %}
							<a href="{{ site_url }}tag/{{ tag.id }}/" rel="tag">{{ tag.name }}</a>	
							{% endfor %}
					</footer>
					<div class="entry-content">
						{% autoescape off %}
							{{ item.content }}
						{% endautoescape %}
					</div>
				</article>
			</li>
		{% endfor %}
	</ol>
	<nav class="body"><ul>
    	{% if posts.has_previous %}
			<li class="left"><a href="?page={{ posts.previous_page_number }} ">Previous</a></li>
		{% endif %}
        {% if posts.has_next %}
			<li class="right"><a href="?page={{ posts.next_page_number }}">Next</a></li>
		{% endif %}
	</ul></nav>
{% endblock %}
